﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Common;

namespace Ex05
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] names = { "Tom", "Dick", "Harry" };

            IEnumerable<string> filteredNames =
                System.Linq.Enumerable.Where(names, n => n.Length >= 4);//静态方法调用Where进行过滤

            foreach (string n in filteredNames)
                Console.Write(n + "|");            // Dick|Harry|


            // In LINQPad, we can also write query results using Dump:

            filteredNames.Dump("Simple use of 'Where' query operator");
            Console.ReadKey();
        }
    }
}
